﻿namespace MobySharp.Actions
{
    public class PostComment : BaseAction, IAction
    {
        private readonly string _message;
        private readonly string _tinyUrlCode;

        public PostComment(string tinyURLCode, string message)
        {
            _tinyUrlCode = tinyURLCode;
            _message = message;

            RequestType = HTTPRequestType.Get;
            Action = APICall.postComment;
        }

        [PostDataInstruction("u", false, 32)]
        public string Username { get; set; }

        [PostDataInstruction("p", false, 32)]
        public string Password { get; set; }

        [PostDataInstruction("name", false)]
        public string Name { get; set; }

        [PostDataInstruction("email", false)]
        public string Email { get; set; }

        [PostDataInstruction("tinyurl_code", true)]
        public string TinyURLCode
        {
            get { return _tinyUrlCode; }
        }

        [PostDataInstruction("message", true)]
        public string Message
        {
            get { return _message; }
        }

        [PostDataInstruction("tweet", false)]
        public int Tweet { get; set; }
    }
}